libobs_wrapper\utils\info/
mod.rs

1mod startup;
2pub use startup::*;
3
4use crate::data::ObsData;
5
6use super::ObsString;
7
8#[derive(Debug)]
9pub struct ObjectInfo {
10    pub(crate) id: ObsString,
11    pub(crate) name: ObsString,
12    pub(crate) settings: Option<ObsData>,
13    pub(crate) hotkey_data: Option<ObsData>,
14}
15
16impl ObjectInfo {
17    pub fn new(
18        id: impl Into<ObsString>,
19        name: impl Into<ObsString>,
20        settings: Option<ObsData>,
21        hotkey_data: Option<ObsData>,
22    ) -> Self {
23        let id = id.into();
24        let name = name.into();
25
26        Self {
27            id,
28            name,
29            settings,
30            hotkey_data,
31        }
32    }
33}
34
35
36pub type OutputInfo = ObjectInfo;
37pub type SourceInfo = ObjectInfo;
38pub type AudioEncoderInfo = ObjectInfo;
39pub type VideoEncoderInfo = ObjectInfo;